package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HisEngineRuleMapper;
import com.ruoyi.system.domain.HisEngineRule;
import com.ruoyi.system.service.IHisEngineRuleService;

/**
 * 规则配置中间Service业务层处理
 *
 * @author Alan
 * @date 2024-03-07
 */
@Service
public class HisEngineRuleServiceImpl implements IHisEngineRuleService
{
    @Autowired
    private HisEngineRuleMapper hisEngineRuleMapper;

    /**
     * 查询规则配置中间
     *
     * @param id 规则配置中间主键
     * @return 规则配置中间
     */
    @Override
    public HisEngineRule selectHisEngineRuleById(Long id)
    {
        return hisEngineRuleMapper.selectHisEngineRuleById(id);
    }

    /**
     * 查询规则配置中间列表
     *
     * @param hisEngineRule 规则配置中间
     * @return 规则配置中间
     */
    @Override
    public List<HisEngineRule> selectHisEngineRuleList(HisEngineRule hisEngineRule)
    {
        return hisEngineRuleMapper.selectHisEngineRuleList(hisEngineRule);
    }

    /**
     * 新增规则配置中间
     *
     * @param hisEngineRule 规则配置中间
     * @return 结果
     */
    @Override
    public int insertHisEngineRule(HisEngineRule hisEngineRule)
    {
        hisEngineRule.setCreateTime(DateUtils.getNowDate());
        return hisEngineRuleMapper.insertHisEngineRule(hisEngineRule);
    }

    /**
     * 修改规则配置中间
     *
     * @param hisEngineRule 规则配置中间
     * @return 结果
     */
    @Override
    public int updateHisEngineRule(HisEngineRule hisEngineRule)
    {
        return hisEngineRuleMapper.updateHisEngineRule(hisEngineRule);
    }

    /**
     * 批量删除规则配置中间
     *
     * @param ids 需要删除的规则配置中间主键
     * @return 结果
     */
    @Override
    public int deleteHisEngineRuleByIds(Long[] ids)
    {
        return hisEngineRuleMapper.deleteHisEngineRuleByIds(ids);
    }

    /**
     * 删除规则配置中间信息
     *
     * @param id 规则配置中间主键
     * @return 结果
     */
    @Override
    public int deleteHisEngineRuleById(Long id)
    {
        return hisEngineRuleMapper.deleteHisEngineRuleById(id);
    }
}
